// ==========================================================================
// GEA自动生成路由代码，只生成一次，按需修改,再次生成不会覆盖.
// 生成日期：{{.table.CreateTime}}
// 生成路径: app/controller/{{.table.ModuleName}}/{{.table.BusinessName}}_router.go
// 生成人：{{.table.FunctionAuthor}}
// ==========================================================================
package {{.table.ModuleName}}

import (
    "{{.table.PackageName}}/app/controller/{{.table.ModuleName}}/{{.table.BusinessName}}"
    "{{.table.PackageName}}/middleware/auth"
    "{{.table.PackageName}}/middleware/cors"
    "{{.table.PackageName}}/middleware/jwt"
    "github.com/gogf/gf/frame/g"
    "github.com/gogf/gf/net/ghttp"
)

//加载路由
func init() {
    {{.table.BusinessName}}Controller := new({{.table.BusinessName}}.Controller)
    s := g.Server("admin")
    s.Group("/", func(group *ghttp.RouterGroup) {
        group.Middleware(cors.CORS,jwt.JWT,auth.Auth)
        group.REST("/business/{{.table.BusinessName}}", {{.table.BusinessName}}Controller)
        group.GET("/business/{{.table.BusinessName}}/export", {{.table.BusinessName}}Controller,"Export")
    })
}
